1. Field of the Invention
This present invention relates to a waveform adjusting system, particularly to a waveform adjusting system for adjusting the magnitude of an overall waveform corresponding to a music file.
2. Description of the Prior Art
With regard to hand-held devices (such as mobile phone, personal digital assistant, etc), the output volume range of the music or sound effect is usually limited and has its upper bound limitation. Referring to FIG. 1, a schematic diagram shows the functional blocks of a music synthesizer used in a hand-held device in the prior art. Conventionally, a music synthesizer 10 is a module having a music file database 11, a music file decoder 12, a tone generator 14, a tone generator 14, a D/A converter 16 and an amplifier 18. The traditional method for processing the music file (such as a MIDI music file) in a hand-held device utilizes the music file decoder 12 to decode a music file 13 into a series of tones. Each tone is represented by a set of tone data 121 including, as an example, the pitch, the duration, the magnitude, and the type of the tone. Different types of tones correspond to different kinds of musical instruments, thus have different kinds of corresponding waveforms. The music file decoder 12 transmits these tone data to the tone generator 14. The tone generator 14 generates a PCM signal 15 based on the received tone data as well as the waveform corresponding to the tone. The D/A converter 16 transfers the PCM signal 15 to an analog signal 17 which is further amplified by the amplifier 18 to drive the speaker 19. The magnitude of each tone in the music file and the maximum number of overlapped tones (also known as “polyphony”) in the music will affect the output volume when the music file is executed and played. In other words, if the amplification ratio of the amplifier 18 in the output circuit is fixed, the magnitude of the overall waveform (the waveform generated by synthesizing all the tones in the music file 13) output from the tone generator 14 will also affect the ultimate output volume. The output circuit here means the circuit set after the D/A converter 16. As shown in FIG. 1; the output circuit includes the amplifier 18 and the speaker 19.
Referring to FIG. 2, it shows an overall waveform 22 corresponding to a first music file and an overall waveform 24 corresponding to a second music file. In this example, the first music file comprises fewer polyphonies and/or the tones in the first music file have small magnitude. The magnitude of the overall waveform 22 outputted from the tone generator 14 might be too small to be suitable for alert ringing purpose, and the input dynamic range 26 of the D/A converter 16 is not fully utilized.
On the other hand, the second music file comprises more polyphonies and/or the tones in the second music file have higher magnitude, the magnitude of the overall waveform 24 outputted from the tone generator 14 might become too high to exceed the input dynamic range 26 of the D/A converter 16, and thus leads to undesirable signal distortion.